﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using DevComponents.DotNetBar;
using System.IO;

namespace HYWJ
{
    public partial class JGPGForm : Office2007Form
    {
        public JGPGForm()
        {
            InitializeComponent();
        }

        private void JGPGForm_Load(object sender, EventArgs e)
        {

        }

        private void button1_Click(object sender, EventArgs e)
        {
            if (MessageBox.Show("确认提交，提交后模拟训练将结束！", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK)
            {
                string filePath = Application.StartupPath + @"\提交文档\结果评估\1.txt";
                string txt = richTextBox1.Text;
                File.WriteAllText(filePath, txt, Encoding.Default);
                //button1.Enabled = false;
                //button2.Enabled = false;
                //richTextBox1.ReadOnly = true;
                this.Close();
            }
        }

        private void button2_Click(object sender, EventArgs e)
        {
            if (MessageBox.Show("确认清空，清空后将不能恢复！", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK)
            {
                this.richTextBox1.Text = "";
            }
        }
    }
}
